package com.mlk.rbac.dto;

import java.util.List;

import com.mlk.rbac.po.SysAclModule;
import org.springframework.beans.BeanUtils;

import com.google.common.collect.Lists;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 系统模块DTO
 * @author xulu
 */
@SuppressWarnings("serial")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class AclModuleTreeDTO extends SysAclModule {
	
	private List<AclModuleTreeDTO> children = Lists.newArrayList();
	
	
	public static AclModuleTreeDTO adapt(SysAclModule aclModule) {
		AclModuleTreeDTO dto = new AclModuleTreeDTO();
		BeanUtils.copyProperties(aclModule, dto);
		return dto;
	}
}
